<template>
  <div class="password">
    <header-bar :text="title" :left="left"></header-bar>
<div class=""><mt-cell title="修改登录密码"
        :to="{ path: '/forget?phone='+pageInfo.userinfo.mobilephone }"
        is-link>
      </mt-cell></div>
      <div><mt-cell :title="type==1?'设置交易密码':type==2?'修改交易密码':'设置交易密码'"
        :to="{ path: '/pay?phone='+pageInfo.userinfo.mobilephone }"
        is-link>
      </mt-cell></div>
  </div>
</template>
<script>
import { Header } from "mint-ui";
import headerBar from "./main/header";
import { mapState, mapGetters, mapMutations, mapActions } from "vuex";
export default {
  name: "Password",
  data() {
    return {
      msg: "",
      user: sessionStorage.getItem("user")
        ? JSON.parse(sessionStorage.getItem("user"))
        : {},
      type: "",
      title: "密码管理",
      left: {
        status: true
      }
    };
  },
  computed: {
    ...mapState(["pageInfo"])
  },
  components: {
    headerBar
  },
  methods: {
    back() {
      this.$router.go(-1);
    }
  },
  mounted() {
    this.type = this.$route.query.type;
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
@import url("../../static/css/password.css");
</style>
